#ifndef INTERFACE_H
#define INTERFACE_H

#ifndef interface
#define interface struct
#endif

// ref. Arena/ArenaSocket/ArenaSocket.cpp

//===========================================================================
interface ITcpServer
{
    virtual bool OnConnected(    int client ) = 0;
    virtual void OnDisconnected( int client ) = 0;
    
    virtual bool OnRead(
        int        client,
        void *     data,
        unsigned   size,
        unsigned & processed
    ) = 0;
};

//===========================================================================
bool InitializeTcpServer(
    ITcpServer * server,
    unsigned int port
);


#endif // INTERFACE_H